<template>
  <a-drawer
    width="45%"
    :title="formTitle"
    :label-col="4"
    :wrapper-col="14"
    :visible="open"
    :body-style="{ height: 'calc(100vh - 100px)', overflow: 'auto' }"
    @close="cancel"
  >
    <a-form-model ref="form" :model="form" :rules="rules" layout="vertical">
      <a-spin :spinning="spinning" :delay="delayTime" tip="Loading...">
        <a-row :gutter="32" style="width: 70%; left: 15%">
          <a-col :span="12">
            <a-form-model-item label="项目名称" prop="projectName">
              <a-input
                v-model="form.projectName"
                placeholder="请输入项目名称"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="24">
            <a-form-model-item label="工单内容" prop="content">
              <a-textarea
                v-model="form.content"
                placeholder="请输入备注"
                :rows="4"
              />
            </a-form-model-item>
          </a-col>

          <a-col :span="8">
            <a-form-model-item label="完成时间" prop="wanchengTime">
              <a-date-picker
                v-model="form.wanchengTime"
                valueFormat="YYYY-MM-DD"
                :show-today="true"
                placeholder="选择日期"
                style="width: 100%"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item label="计划时间" prop="planTime">
              <a-date-picker
                v-model="form.planTime"
                valueFormat="YYYY-MM-DD"
                :show-today="true"
                placeholder="选择日期"
                style="width: 100%"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item label="工期（天）" prop="gongqi">
              <a-input-number
                v-model="form.gongqi"
                :min="0"
                style="width: 100%"
                placeholder="输入工期"
              />
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item label="工单类型" prop="type">
              <a-select
                placeholder="请选择工单类型"
                v-model="form.type"
                :getPopupContainer="
                  (triggerNode) => {
                    return triggerNode.parentNode || document.body;
                  }
                "
                style="width: 100%"
                allow-clear
              >
                <a-select-option
                  v-for="(d, index) in typeOptions"
                  :key="index"
                  :value="d.dictValue"
                  >{{ d.dictLabel }}</a-select-option
                >
              </a-select>
            </a-form-model-item>
          </a-col>
          <a-col :span="8">
            <a-form-model-item label="提报人" prop="tibaoUser">
              <a-input v-model="form.tibaoUser" placeholder="请输入提报人" />
            </a-form-model-item>
          </a-col>
          <!-- <a-col :span="8">
            <a-form-model-item label="开发人员" prop="worker">
              <a-input v-model="form.worker" placeholder="请输入开发人员" />
            </a-form-model-item>
          </a-col> -->

          <a-col :span="24">
            <a-form-model-item label="图片资料" prop="worker">
              <image-upload @setFileList="setFileList" :fileList="fileList" />
            </a-form-model-item>
          </a-col>
        </a-row>
        <a-row :gutter="32"> </a-row>
      </a-spin>
      <div class="bottom-control">
        <a-space>
          <a-button @click="cancel"> 取消 </a-button>
          <a-button type="primary" @click="submitForm"> 保存 </a-button>
        </a-space>
      </div>
    </a-form-model>
  </a-drawer>
</template>
<script>
import BizWorkerListEditForm from "./BizWorkerListForm";
export default {
  ...BizWorkerListEditForm,
};
</script>
